package com.tengju.bff.interfaces.covercharge.handler;

import com.tengju.bff.interfaces.covercharge.constant.CoverChargeErrorCode;
import com.tengju.bff.interfaces.covercharge.constant.ServiceException;

/**
 * @author liang_shi
 * @date 2020/7/16 15:39
 * @description 服务费自定义异常
 */
public class CoverChargeException extends ServiceException {

    private String code;

    private String msg;


    public CoverChargeException(String message) {
        super(message);
    }

    public CoverChargeException(String code, String msg) {
        super(msg);
        this.code = code;
        this.msg = msg;
    }

    public CoverChargeException(Integer code, String msg) {
        super(msg);
        this.code = String.valueOf(code);
        this.msg = msg;
    }

    public CoverChargeException(CoverChargeErrorCode errorCode, String msg) {
        super(msg);
        this.code = String.valueOf(errorCode.getCode());
        this.msg = msg;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
